<?php
$s['AddTitle'] = "View member";
$s['AddHead']='<link rel="stylesheet" type="text/css" href="'.base_url().'css/mem/table_design.css" />';
$this->load->view('mem/a_header',$s);
$this->load->view('mem/a_panel_v');
?>
<form name="searchmember" id="seachmember" action="<?=base_url()?>mem/admin/search" method="post">
Search member :	<input type="text" name="search" id="search" />
	<input type="submit" name="submit" value="Submit">
</form>
<div id="itsthetable"> 
<table name="viewmember" id="viewmember" width="100%" summary="All member">
	<caption>รายการสมาชิก</caption> 
	<thead>
	<tr>
		<th scope="col">ID</th>
		<th scope="col">User</th>
		<th scope="col">Email</th>
		<th scope="col">Name</th>
		<th scope="col">Signupdate</th>
		<th scope="col">Action</th>
	</tr>	
	</thead>
<tbody>
	<?php
	while($t = mysql_fetch_assoc($mem)){
	?>
	<tr>
		<td><?=$t['id']?></td>
		<td><?=$t['username']?></td>
		<td><?=$t['email']?></td>
		<td><?=$t['p_name']?></td>
		<td><?=$t['signupdate']?></td>
		<td><a href="<?=base_url()?>mem/admin/memberdetail/<?=$t['id']?>"><img src="<?=base_url()?>css/mem/images/search_16.png" alt="view" /></a> | 
		<a href="<?=base_url()?>mem/admin/editmember/<?=$t['id']?>"><img src="<?=base_url()?>css/mem/images/pencil_16.png" alt="edit" /></a> | 
		<a href="<?=base_url()?>mem/admin/deletemember/<?=$t['id']?>"><img src="<?=base_url()?>css/mem/images/delete_16.png" alt="edit" /></a></td>
	</tr>
	<?
	}
	?>
	</tbody>

	</table>
	<div align="center"><?php
			
$config['uri_segment'] = 4;
$config['base_url'] 	= base_url().'mem/admin/viewmember/';
$config['total_rows'] 	= $countmember;
$config['per_page'] 	= $perpage; 

$this->pagination->initialize($config); 
echo $this->pagination->create_links();
?></div>
<?php
$this->load->view('mem/a_footer');
?>